<include file="Index/header" />


<div class="container">
	<form action="?m=Home&c=user&a=update" method="post" onsubmit="return checkForm()"
		style="width: 30%; margin: 60px auto;">
		<div class="form-group">
			<label for="u_email">邮箱</label>
			<input type="text" class="form-control" placeholder="邮箱" name="u_email" id="u_eamil"
				value="{$user_info['u_email']}">
		</div>
		<div class="form-group">
			<label for="mobile_phone">手机号</label>
			<input type="text" class="form-control" placeholder="手机号" name="mobile_phone" id="mobile_phone"
				value="{$user_info['mobile_phone']}">
		</div>
		<div class="form-group">
			<label for="u_gender">性别</label>
			<select name="u_gender" class="form-control">
				<option <eq name="user_info['u_gender']" value="男">selected</eq>>男</option>
				<option <eq name="user_info['u_gender']" value="女">selected</eq>>女</option>
			</select>
		</div>
		<div class="form-group">
			<label for="u_address">地址</label>
			<input type="text" class="form-control" placeholder="地址" name="u_address" id="u_address"
				value="{$user_info['u_address']}">
		</div>
		<div class="form-group">
			<label for="u_birthday">生日</label>
			<input type="date" class="form-control" placeholder="生日" name="u_birthday" id="u_birthday"
				value="{$user_info['u_birthday']}">
			<!-- 这里转下格式format, "yyyy-MM-dd" -->
		</div>
		<button type="submit" class="btn btn-primary btn-lg btn-block">更 新</button>
		<a href="?m=Home&c=user&a=showList" class="btn btn-default btn-lg btn-block">返 回</a></button>
	</form>

	<!--错误信息提示-->
	<notempty name='error'>
		<div class='alert alert-danger' style="margin-right:60%">
			<span style='color:red'>错误信息:</span>
			<foreach name='error' item='error'>
				<li>{$error}</li>
			</foreach>
		</div>
	</notempty>
</div>

<script type="text/javascript">
	//进行初步非空检测
	function checkForm() {
		var uphone = document.getElementById("mobile_phone").value;
		var uemail = document.getElementById("u_email").value;
		var ubirthday = document.getElementById("u_birthday").value;
		if (uphone == "") {
			alert("手机号未填写！！");
			return false;
		}
		else if (uemail == "") {
			alert("邮箱未填写！！");
			return false;
		}
		return true;
	}
</script>

<include file="Index/footer" />